﻿<?xml version="1.0" encoding="utf-8"?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:c4fConverters="clr-namespace:Coding4Fun.Toolkit.Controls.Converters;assembly=Coding4Fun.Toolkit.Controls" xmlns:Binding="clr-namespace:Coding4Fun.Toolkit.Controls.Binding" xmlns:Primitives="clr-namespace:Coding4Fun.Toolkit.Controls.Primitives" xmlns:superslider="clr-namespace:SuperSliderUpdate" xmlns:converters="clr-namespace:Coding4Fun.Toolkit.Controls.Converters;assembly=Coding4Fun.Toolkit.Controls">

    <converters:SolidColorBrushToColorConverter x:Key="BrushToBrush" />
    <SolidColorBrush x:Key="DefaultAccentBrush" Color="{Binding Source={StaticResource PhoneAccentBrush}, Converter={StaticResource BrushToBrush}}" />
    <SolidColorBrush x:Key="DefaultChromeBrush" Color="{Binding Source={StaticResource PhoneChromeBrush}, Converter={StaticResource BrushToBrush}}" />
    <SolidColorBrush x:Key="DefaultBackgroundBrush" Color="{Binding Source={StaticResource PhoneBackgroundBrush}, Converter={StaticResource BrushToBrush}}" />
    <SolidColorBrush x:Key="DefaultForegroundBrush" Color="{Binding Source={StaticResource PhoneForegroundBrush}, Converter={StaticResource BrushToBrush}}" />
    <SolidColorBrush x:Key="DefaultSubtleBrush" Color="{Binding Source={StaticResource PhoneSubtleBrush}, Converter={StaticResource BrushToBrush}}" />
    <SolidColorBrush x:Key="DefaultDisabledBrush" Color="{Binding Source={StaticResource PhoneDisabledBrush}, Converter={StaticResource BrushToBrush}}" />
    <SolidColorBrush x:Key="DefaultContrastDisabledBrush" Color="{Binding Source={StaticResource PhoneChromeBrush}, Converter={StaticResource BrushToBrush}}" />
    <SolidColorBrush x:Key="DefaultSemiTransparentBrush" Color="{Binding Source={StaticResource PhoneSemitransparentBrush}, Converter={StaticResource BrushToBrush}}" />
    <sys:Double x:Key="DefaultFontSizeExtraSmall">12</sys:Double>
    <sys:Double x:Key="DefaultFontSizeNormal">20</sys:Double>
    <sys:Double x:Key="DefaultFontSizeMedium">22.667</sys:Double>
    <sys:Double x:Key="DefaultFontSizeMediumLarge">25.333</sys:Double>
    <sys:Double x:Key="DefaultFontSizeLarge">32</sys:Double>
    <FontFamily x:Key="FontFamilySegoeNormal">Segoe WP</FontFamily>
    <FontFamily x:Key="FontFamilySegoeSemiBold">Segoe WP Semibold</FontFamily>
    <FontFamily x:Key="FontFamilySegoeSemiLight">Segoe WP SemiLight</FontFamily>
    <sys:Double x:Key="DefaultAppButtonSize">70</sys:Double>
    <sys:Double x:Key="DefaultTileSize">173</sys:Double>
    <Thickness x:Key="DefaultTextBoxInnerMargin">1,2</Thickness>
    <Thickness x:Key="DefaultBorderThickness">3</Thickness>
    <SolidColorBrush x:Key="DefaultTextBoxBrush" Color="{Binding Source={StaticResource PhoneTextBoxBrush}, Converter={StaticResource BrushToBrush}}" />
    <SolidColorBrush x:Key="DefaultTextBoxForegroundBrush" Color="{Binding Source={StaticResource PhoneTextBoxForegroundBrush}, Converter={StaticResource BrushToBrush}}" />
    <SolidColorBrush x:Key="DefaultTextBoxReadOnlyBrush" Color="{Binding Source={StaticResource PhoneTextBoxReadOnlyBrush}, Converter={StaticResource BrushToBrush}}" />
    <SolidColorBrush x:Key="DefaultTextBoxEditBackgroundBrush" Color="{Binding Source={StaticResource PhoneTextBoxEditBackgroundBrush}, Converter={StaticResource BrushToBrush}}" />
    <SolidColorBrush x:Key="DefaultTextBoxEditBorderBrush" Color="{Binding Source={StaticResource PhoneTextBoxEditBorderBrush}, Converter={StaticResource BrushToBrush}}" />
    <SolidColorBrush x:Key="DefaultTextBoxSelectionForegroundBrush" Color="{Binding Source={StaticResource PhoneTextBoxSelectionForegroundBrush}, Converter={StaticResource BrushToBrush}}" />
    <ControlTemplate x:Key="DisabledChatBubbleTextBoxTemplate" TargetType="TextBox">
        <ContentControl x:Name="ContentElement" BorderThickness="0" Margin="{TemplateBinding Margin}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
    </ControlTemplate>

    <Style TargetType="superslider:SuperSlider2" >
        <Setter Property="Background" Value="{StaticResource DefaultChromeBrush}" />
        <Setter Property="Foreground" Value="{StaticResource DefaultAccentBrush}" />
        <Setter Property="Padding" Value="0, 3, 0, 36" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="superslider:SuperSlider2">
                    <Grid Name="Body">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="ProgressRectangle">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultDisabledBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BackgroundRectangle">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DefaultChromeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid Grid.Row="1">
                            <Border Margin="{TemplateBinding Padding}">
                                <Grid Name="BarBody">
                                    <Rectangle Grid.Row="1" Name="BackgroundRectangle" Fill="{TemplateBinding Background}" />
                                    <Rectangle Grid.Row="1" Name="ProgressRectangle" Fill="{TemplateBinding Foreground}" />
                                    <ContentPresenter x:Name="Thumb" Grid.Row="1" />
                                </Grid>
                            </Border>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>